<%@ page language="java" pageEncoding="utf-8" contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="ww" uri="webwork" %>
<div class="tree-panel" layouth="5">
<ul id="rzOrgPostTree" class="ztree"></ul>
</div>
<div class="trigger close" onclick="$('.tree-panel').toggle();$(this).toggleClass('close');"></div>

<div layoutH="5" id="div_org" class="table-div">
	
	<jsp:include page="dirsysjobsmin.jsp"></jsp:include>
</div>
<script type="text/javascript">

var upperTree_setting2 = {
		treeObj : null,
		data : {
			simpleData : {
				enable : true
			}
		},
		callback : {
			onClick : org_onClick2
		}
};

function org_onClick2(e, treeId, treeNode) {
	var $form=$('#div_org').find("#dirorgpostsysroles_form");
	$("#jobId",$form).val(treeNode ? treeNode.id : "");
	if (!isnull($("#orgId",$form).val()) && !isnull($("#jobId",$form).val())) {
		$form.submit();	 
	}
}

var orgPostNode = <ww:property value="upperTrees"/>;
var rf_tree  = null;
using(['tree'],function(){
   rf_tree =  $.fn.zTree.init($("#rzOrgPostTree"), upperTree_setting2,orgPostNode);    
})
</script>